include_directories(${QT_INCLUDE_DIR})
include_directories(${QT_QTCORE_INCLUDE_DIR})
include_directories(${QT_QTGUI_INCLUDE_DIR})
include_directories(${QT_QTOPENGL_INCLUDE_DIR})
include_directories(${QT_QTHELP_INCLUDE_DIR})
include_directories(${OSG_INCLUDE_DIR})

set(APPLICATION_INCLUDES 
    MainWindow.h
    ModelView.h
    About.h
    HelpBrowser.h
    HelpViewer.h
    HelpSelectDialog.h
    LSStyle.h
    GLDrawer.h
    MVToolBar.h
    Splash.h
    EventHandler.h
    CameraController.h)
	
set(APPLICATION_UIS 
	MainWindow.ui
    About.ui
    HelpBrowser.ui
    HelpSelectDialog.ui
    Splash.ui)

set(APPLICATION_RCCS
	Resources.qrc)
	
QT4_ADD_RESOURCES(APPLICATION_RCCS_SRC ${APPLICATION_RCCS})
	
QT4_WRAP_CPP(SOURCES_H_MOC ${APPLICATION_INCLUDES})

QT4_WRAP_UI(APPLICATION_UIS_H ${APPLICATION_UIS})

set(APPLICATION_SRC
	${SOURCES_H_MOC}
	main.cpp
    MainWindow.cpp
    ModelView.cpp
    About.cpp
    HelpBrowser.cpp
    HelpViewer.cpp
    HelpSelectDialog.cpp
    LSStyle.cpp
    GLDrawer.cpp
    MVToolBar.cpp
    Splash.cpp
    EventHandler.cpp
    CameraController.cpp)

if(WIN32)
	set(APPLICATION_SRC ${APPLICATION_SRC} Res.rc)
endif(WIN32)
	
include_directories(${CMAKE_CURRENT_BINARY_DIR})

add_executable(${PROJECT_NAME} ${APPLICATION_SRC} ${APPLICATION_INCLUDES} ${APPLICATION_UIS} ${APPLICATION_RCCS_SRC})

target_link_libraries(${PROJECT_NAME}
						${QT_QTCORE_LIBRARIES}
						${QT_QTGUI_LIBRARIES}
						${QT_QTOPENGL_LIBRARIES}
						${QT_QTHELP_LIBRARIES}
						${OPENTHREADS_LIBRARIES}
						${OSG_LIBRARIES}
						${OSGDB_LIBRARIES}
						${OSGGA_LIBRARIES}
						${OSGVIEWER_LIBRARIES}
						${OPENGL_gl_LIBRARY}
						${OPENGL_glu_LIBRARY})
